@(title: String, time: String, valueForm: Form[KeyValueModel], message: String)

@import helper._

@main(title) {
    
	<h1>@title</h1>
	<h2>
		Demonstration of the distributed cache
	</h2>
	<p>
		<ul>
			<li><a href="/">Go to home page</a></li>
			<li><a href="/session">Go to the session demo page</a><br/></li>
			<li><a href="/cacheas">Go to distributed cache as session demo page</a></li>
		</ul>
	</p>
	<p>
		Message received for the last action (@time):
	</p>
	<p class="infomessage">		
		@message
	</p>

 	
 	<h3>Destroy the cache</h3>
	<p>
		<a href="/cache/destroycache">Destroy the cache</a>
 	</p>
 	
 	<h3>Set the key:value in the global cache</h3>
	<p>
		
		@form(routes.CacheDemo.setValueInGlobalCache()) {
        
	        <fieldset>
	            @inputText(valueForm("key"), '_label -> "key to use")
	            @inputText(valueForm("value"), '_label -> "value to set in the cache")
	        </fieldset>
	        <div class="actions">
	            <input type="submit" value="Set the key:value in the cache" class="btn primary">
	        </div>
        
    	}
 	</p>
 	
 	<h3>Read the value in the cache for a specific key</h3>
	<p>
		
		@form(routes.CacheDemo.getValueInGlobalCache()) {
        
	        <fieldset>
	            @inputText(valueForm("key"), '_label -> "key to use")
	        </fieldset>
	        <div class="actions">
	            <input type="submit" value="Read the value in the global cache for this key" class="btn primary">
	        </div>
        
    	}
 	</p>

 	
    
}